Image capturing apparatus and method of controlling image capturing apparatus

ABSTRACT

In an image capturing apparatus having an image sensor including a plurality of unit pixels each having a plurality of photoelectric conversion portions and a microlens, the image sensor can be scanned with a first scan method of adding and reading out signals from a portion of the photoelectric conversion portions by a predetermined number of unit pixels and with a second scan method of adding and reading out signals from the photoelectric conversion portions by the predetermined number of unit pixels. A pixel signal read out with the second scan method is selected if a defocus amount is larger than a threshold value and the larger of the pixel signal read out with the second scan method and a signal obtained by using the pixel signal read out with the first scan method is selected if the defocus amount is equal to the threshold value or less.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to an image capturing apparatus and amethod of controlling an image capturing apparatus.

Description of the Related Art

In recent years, in image capturing apparatuses such as a digital videocamera and a digital still camera, imaging with a high number of pixelsand at high frame rates due to high-speed readout has become possiblefollowing improvements in image sensor sensitivity, enhancements inimage processing, and increases in memory capacity. Imaging at a highframe rate has various benefits such as an increase in AF speed andimprovements in video quality, and further increases in frame rate arein demand.

On the other hand, a pixel arithmetic averaging method is known as apixel reduction method for capturing a moving image with a comparativelylow number of pixels at a high frame rate using an image capturingapparatus with a high number of pixels. In the pixel arithmeticaveraging method, the data rate is reduced and a high frame rate isrealized by performing arithmetic averaging on multiple pixels in aspecific cycle in the image sensor. Japanese Patent Laid-Open No.2010-259027 discloses the output of the arithmetic average of imagesignals from multiple rows by using a row selection circuit to selectand output signals from multiple pixel rows at the same time.

However, in the case in which multiple pixel rows are selectedsimultaneously and connected, there are cases in which the dynamic rangecan no longer be ensured. This issue becomes prominent particularly incases in which there is a large difference in signals betweensimultaneously connected pixels. For this reason, in Japanese PatentLaid-Open No. 2010-259027, the dynamic range is ensured by increasingthe current value for driving the pixels that perform signal outputaccording to the number of rows simultaneously connected, and raisingthe driving capacity of the amplifier circuit. However, there is anissue of an increase in power consumption during readout due to theraising of the current value for driving the pixels.

SUMMARY OF THE INVENTION

The present invention has been made in consideration of the abovesituation, and in an image capturing apparatus, realizes high-speedreadout while also suppressing deterioration in image quality withoutincreasing power consumption.

According to the present invention, provided is an image capturingapparatus comprising: an image sensor including a plurality of unitpixels each having a plurality of photoelectric conversion portions forone out of a plurality of microlenses; a readout unit configured to becapable of reading out pixel signals by scanning the image sensor with afirst scan method of adding and reading out signals from a portion ofthe plurality of photoelectric conversion portions by a predeterminednumber of unit pixels, and a second scan method of adding and readingout signals from the plurality of photoelectric conversion portions bythe predetermined number of unit pixels; a detection unit configured toobtain a defocus amount; and a selection unit configured to select, foreach read out pixel signal, a pixel signal read out with the second scanmethod in a case in which the defocus amount is larger than apredetermined threshold value, or a larger signal out of the pixelsignal read out with the second scan method and a signal obtained byusing the pixel signal read out with the first scan method in a case inwhich the defocus amount is less than or equal to the predeterminedthreshold value.

According to the present invention, provided is a method of controllingan image capturing apparatus that has an image sensor including aplurality of unit pixels each having a plurality of photoelectricconversion portions for one out of a plurality of microlenses, themethod comprising: reading out pixel signals by scanning the imagesensor with a first scan method of adding and reading out signals from aportion of the plurality of photoelectric conversion portions by apredetermined number of unit pixels; reading out pixel signals byscanning the image sensor with a second scan method of adding andreading out signals from the plurality of photoelectric conversionportions by the predetermined number of unit pixels; obtaining a defocusamount; and selecting, for each read out pixel signal, a pixel signalread out with the second scan method in a case in which the defocusamount is larger than a predetermined threshold value, or a largersignal out of the pixel signal read out with the second scan method anda signal obtained by using the pixel signal read out with the first scanmethod in a case in which the defocus amount is less than or equal tothe predetermined threshold value.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the invention, andtogether with the description, serve to explain the principles of theinvention.

FIG. 1 is a diagram showing a conceptualization of luminous flux thathas exited an exit pupil of an imaging lens of an image capturingapparatus, and is entering a unit pixel according to an embodiment ofthe present invention;

FIG. 2 is a block diagram showing a functional configuration of theimage capturing apparatus according to the embodiment;

FIG. 3 is a diagram showing a configuration of an image sensor accordingto the embodiment;

FIG. 4 is a circuit diagram of a unit pixel of the image capturingapparatus according to the embodiment;

FIG. 5 is a flowchart showing processing according to a firstembodiment;

FIG. 6 is a conceptual diagram showing the relation between a pixel anda defocus region according to the embodiment;

FIG. 7 is a flowchart showing processing according to a secondembodiment; and

FIG. 8 is a diagram showing conditions for calculating a pixel signalaccording to a third embodiment.

DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments of the present invention will be described indetail in accordance with the accompanying drawings. Note that in thediagrams used for the following descriptions, the same components areshown with the same reference numbers.

First Embodiment

First, the principles by which a phase difference detection method typeof focus detection is realized in a normal image sensor for capturing asubject image will be described. FIG. 1 is a diagram that schematicallyshows a situation in which luminous flux that has exited from an exitpupil of an imaging lens is incident on one unit pixel of the imagesensor. A unit pixel 100 has a first photodiode (PD) 101A and a secondphotodiode (PD) 101B, and is covered by a color filter 302 and amicrolens 303.

The center of an exit pupil 304 of the imaging lens is an optical axis305 with regards to a pixel that has the microlens 303. Light that haspassed through the exit pupil 304 enters the unit pixels 100 with theoptical axis 305 as the center. Also, as shown in FIG. 1, luminous fluxthat passes through a pupil region 306, which is a portion of the regionof the exit pupil 304 of the imaging lens, is received by the first PD101A through the microlens 303. Similarly, luminous flux that passesthrough a pupil region 307, which is a portion of the region of the exitpupil 304, is received by the second PD 101B through the microlens 303.Accordingly, the first PD 101A and the second PD 101B each receive lightthat has passed through separate regions of the exit pupil 304.Accordingly, phase difference detection can be performed by comparingsignals from the first PD 101A and the second PD 101B.

Hereinafter, a signal obtained from the first PD 101A is to be called anA image signal and a signal obtained from the second PD 101B is to becalled a B image signal. Also, a signal in which the signal from thefirst PD 101A and the signal from the second PD 101B are added and readout is an (A+B) image signal and can be used to capture images.

Next, a block diagram in FIG. 2 shows a configuration of the imagecapturing apparatus according to the first embodiment. Zoom control,focus control, aperture control, and the like are performed on animaging lens 1111 by a lens driving circuit 1110, and an optical imageof a subject is formed on an image sensor 1101. Multiple unit pixels 100that have the configuration shown in FIG. 1 are arranged in a matrix inthe image sensor 1101, and the subject image formed on the image sensor1101 is converted into an electrical image signal and output from theimage sensor 1101. A signal processing circuit 1103 performs varioustypes of correction on the image signal output from the image sensor1101, and compresses data. Also, the signal processing circuit 1103generates the B image signal as the differential signal between the Aimage signal and the (A+B) image signal obtained from the image sensor1101.

A timing generation circuit 1102 outputs a timing signal for driving theimage sensor 1101. An overall control/operation circuit 1104 performsvarious types of operations, and controls overall operations of theimage capturing apparatus including operations of the image sensor 1101.The overall control/operation circuit 1104 furthermore performs thephase difference detection method type of focus state detectionoperations using the A image signal and the B image signal, and alsocalculates the amount of defocus. Image data that the signal processingcircuit 1103 outputs is temporarily stored to a memory 1105. Anon-volatile memory 1106 stores programs, various types of thresholdvalues, adjustment values that are different for each image capturingapparatus, and the like. A display circuit 1107 displays various typesof information and captured images. A recording circuit 1108 is acircuit that performs reading and writing from and to a removablerecording medium, such as a semiconductor memory, for performing therecording or reading out of image data. An operation circuit 1109includes an input device group typified by a switch, a button, a touchpanel, and the like, and receives user instructions for the imagecapturing apparatus.

Next, an example of the configuration of the image sensor 1101 will bedescribed using FIG. 3 and FIG. 4. FIG. 3 is a diagram that shows anexample of an overall configuration of the image sensor 1101. The imagesensor 1101 includes a pixel region 1, a vertical scanning circuit 2, areadout circuit 3, a horizontal scanning circuit 4, and an outputamplifier 5. Multiple unit pixels 100 are arranged in a matrix in thepixel region 1. Here, 16 pixels arranged 4×4 are shown for ease ofdescription, but actually, a million or more unit pixels are arranged ina matrix. As shown in FIG. 1, each unit pixel 100 includes the first PD101A and the second PD 101B. In the present embodiment, the verticalscanning circuit 2 selects pixels in the pixel region 1 in units of onerow, and sends out a driving signal to the pixels in the selected row.The readout circuit 3 includes a column readout circuit for each column,and amplifies the output signal from the unit pixels 100 and performssample-holding of the output signal. The horizontal scanning circuit 4sends out a signal for successive output of the signal sample-held bythe readout circuit 3 to the output amplifier 5 for each column. Theoutput amplifier 5 outputs the signal that was output from the readoutcircuit 3 to the signal processing circuit 1103 by the operation of thehorizontal scanning circuit 4. The vertical scanning circuit 2, thereadout circuit 3, and the horizontal scanning circuit 4 are driven by atiming signal from the timing generation circuit 1102.

FIG. 4 is a circuit diagram that shows an example of a configuration ofunit pixels 100 that have been connected in an arbitrary column. Thefollowing is a description of the pixel circuit of row n, but the unitpixels 100 that follow from row n+1 onward have a similar configuration,and therefore their configurations are not shown in the diagram.Regarding the driving signal, to differentiate the rows, a row numbersuffix is attached to each driving signal.

A first transfer switch 102A and a second transfer switch 102B arerespectively connected to the first PD 101A and the second PD 101B.Also, the output of the first transfer switch 102A and the secondtransfer switch 102B is connected to an amplifier 104 through a floatingdiffusion (FD) region 103. A reset switch 105 is connected to the FDregion 103, and a selection switch 106 is connected to the source of theamplifier 104.

The first PD 101A and the second PD 101B receive light that has passedthrough the same microlens 303, and function as a photoelectricconversion portion that generates a signal charge that corresponds tothe amount of light received. The first transfer switch 102A and thesecond transfer switch 102B function as a transfer unit that transfersthe charge generated by the first PD 101A and the second PD 101B to thecommon FD region 103. Also, the first transfer switch 102A and thesecond transfer switch 102B are respectively controlled by transferpulse signals PTXAn and PTXBn from the vertical scanning circuit 2.

The FD region 103 temporarily holds the charge transferred from thefirst PD 101A and the second PD 101B, and functions as a charge/voltageconversion unit that converts the held charge into a voltage signal. Theamplifier 104 is a source follower MOS transistor that amplifies thevoltage signal converted by the FD region 103, and outputs the voltagesignal as a pixel signal.

In the case in which the transfer pulse signal PTXAn is H and PTXBn isL, only the charge of the first PD 101A is transferred to the FD region103, and the A image signal can be read out via the amplifier 104. Also,when both the transfer pulse signals PTXAn and the PTXBn are controlledto H, the charges of the first PD 101A and the second PD 101B aretransferred to the FD region 103. For this reason, the signal in whichthe A image signal is added to the B image signal, in other words the(A+B) image signal, can be read out via the amplifier 104. In the signalprocessing circuit 1103, the B image signal is calculated from thedifference between the read-out A image signal and the (A+B) imagesignal, and a defocus amount is calculated by a widely-known phasedifference operation.

The reset switch 105 is controlled by a reset pulse signal PRESn fromthe vertical scanning circuit 2, and the electrical potential of the FDregion 103 is reset to a reference electrical potential VDD 108.

In the case in which an image with a high resolution such as that instill image shooting is required, one selection switch 106 in eachcolumn, in other words one row's worth, is controlled by a verticalselection pulse signal PSELn by the vertical scanning circuit 2. Then,the voltage signal amplified by the amplifier 104 is output to avertical output line 107 as a pixel signal. The pixel signal output tothe vertical output line 107 is read out to the readout circuit 3, and asignal output from the readout circuit 3 by the operation of thehorizontal scanning circuit 4 is successively read out through theoutput amplifier 5. Similarly, a pixel signal from each unit pixel isread out by continuing the pattern of row n+1, row n+2, and so on. Thisreadout is similar when the A image signal is read out (a third scanmethod) as well as when the (A+B) image signal is read out (a fourthscan method).

On the other hand, because an image with high temporal resolution isrequired in moving image shooting, several pixels in the verticaldirection are selected simultaneously for the purpose of reducing thenumber of pixels for an increase in readout speed, and an arithmeticaverage is obtained. For example, in the case in which a color filter302 is a primary color filter with the widely known Bayer arrangement,and three pixels are to be added, three selection switches 106 in eachcolumn are simultaneously turned ON by the vertical scanning circuit 2using vertical selection pulse signals PSELn, PSELn+2, and PSELn+4, forexample. In this way, a pixel signal in which the row n+2 is the pixelcenter of gravity is obtained, and the arithmetic average of the voltagesignals is output to the vertical output line 107 via the amplifier 104.Also, to obtain the pixel output of the next row, vertical selectionpulse signals PSELn+3, PSELn+5, and PSELn+7, for example, aresimultaneously set to H by the vertical scanning circuit 2. The pixelcenter of gravity of the pixel signal in this case is a row n+5, and thepixel center of gravity occurs in three row intervals, and thus an imagesignal reduced to ⅓ in the vertical direction can be read out. Thisreadout is similar when the A image signal is read out (a first scanmethod) as well as when the (A+B) image signal is read out (a secondscan method).

Note that also when capturing a still image for which a high resolutionis not required, readout need only be performed similarly to the readoutmethod for moving image shooting.

Next, an image formation method according to the first embodiment willbe explained using the flowchart in FIG. 5, taking moving image shootingas an example.

When a moving image start instruction is given, a number of frames N isreset to 1 in step S501. Next, in step S502, the A image signal and the(A+B) image signal of the first frame are obtained. Here, the A imagesignal output of the pixel at the coordinates (x, y) in the N-th frameis denoted by A(x,y,n) and the (A+B) image signal output is denoted byAB(x,y,N), and furthermore, the defocus amount is denoted by D(x,y,N).Normally, a defocus amount is often defined for each region such as inFIG. 6, and therefore in that case the defocus amount is that of theregion to which the pixel with corresponding coordinates belongs.

In step S503, a defocus amount D(x,y,1) is calculated from the A imagesignal in the first frame, and the B image signal, which is thedifference when the A image signal is subtracted from the (A+B) imagesignal. Then in step S504, the A image signal and the (A+B) image signalof the (N+1)-th frame (the second frame in the first routine) areobtained, and a defocus amount D(x,y,N+1) is calculated in step S505.

In step S506, a final image signal P(x,y,N+1) in the (N+1)-th frame isdetermined based on the defocus amount D(x,y,N) of each pixel in theN-th frame. In the first embodiment, in the case in which the defocusamount D(x,y,N) of an N-th frame is larger than a predeterminedthreshold value Dth or cannot be calculated, the following equation isused.P(x,y,N+1)=AB(x,y,N+1)Note that a threshold value Dth is appropriately set as a value that isregarded as being in focus or approximately in focus, or the likeaccording to the focal length, the depth of field, etc., of the imaginglens 1111.

If the defocus amount D(x,y,N) of the N-th frame is less than or equalto the threshold value Dth, then the following equation is used.P(x,y,N+1)=Max{AB(x,y,N+1),2×A(x,y,N+1)}The above is performed on all pixel coordinates (x,y) related to imageoutput for the (N+1)-th frame.

Note that the reason for using the defocus amount D(x,y,N) of theprevious frame is that, for communication time and operation processingreasons, it is difficult to immediately use the defocus amountD(x,y,N+1) of the (N+1)-th frame. However, for example, in the case inwhich a still image with low resolution is processed, the defocus amountD(x,y,N+1) of the (N+1)-th frame can also be used.

Normally in a region in which the defocus amount is small, the output ofthe A image signal and the output of the B image signal areapproximately equal. However, if there is a large difference in signalsbetween pixels that are targeted for pixel addition, there are cases inwhich the desired arithmetic average cannot be obtained, and the (A+B)image signal, which is the addition output of the two photodiodes 101Aand 101B, appears more prominently. In view of this, the larger out ofthe signal output of the (A+B) image signal, which is the original imagesignal, and the doubled A image signal is to be the final image signalP(x,y,N+1) of the (N+1)-th frame.

Then, until an instruction to end moving image shooting is given, thenumber of frames N is incremented in step S507, and the procedurereturns to step S504.

As described above, by determining the pixel signal based on the defocusamount, a loss in dynamic range that occurs when an arithmetic averageis output can be compensated for, without increasing power consumption.

Second Embodiment

Next, an image formation method in a second embodiment of the presentinvention will be described using the flowchart in FIG. 7. A differencefrom the first embodiment is the point that the operation for replacingthe final image signal with a doubled A image signal in step S506 isperformed on only G pixels in the second embodiment. Normally, the imagesensor 1101 is matched to the human relative luminosity factor, and thusin the case in which the image sensor 1101 is covered with the primarycolor filter 302, the sensitivity of the G pixel is the highest. Forthis reason, when obtaining the arithmetic average, only the G pixelswhere loss of dynamic range is likely to occur are replaced. Note thatthe same step numbers have been allocated to processes in FIG. 7 thatare similar to FIG. 5.

When an instruction is made to start moving image shooting, the numberof frames N is reset to one in step S501. Next, in step S502 the A imagesignal and the (A+B) image signal in the first frame are obtained. Instep S503, a defocus amount D(x,y,1) is calculated from the A imagesignal in the first frame, and the B image signal, which is obtained bysubtracting the A image signal from the (A+B) image signal. Next in stepS504, the A image signal and the (A+B) image signal of the (N+1)-thframe are obtained, and the defocus amount D (x,y,N+1) is calculated instep S505.

Next in step S706, a final image signal P(x,y,N+1) in the (N+1)-th frameis determined based on the defocus amount D (x,y,N) of each pixel in theN-th frame. In the second embodiment, in the image signal P(x,y,N+1),the R pixel is denoted by R(x,y,N+1), the G pixel is denoted by G(x,y,N+1), and the B pixel is denoted by B(x,y,N+1). For the R pixel andthe B pixel, regardless of the defocus amount D(x,y,N), the AB(x,y,N+1)that is the (A+B) image signal of the (N+1)-th frame is used as is asthe final image signal. On the other hand, for the G pixel, in the casein which the defocus amount D(x,y,N) of the N-th frame is larger thanthe threshold value Dth, or cannot be calculated, then the followingequation is used.G(x,y,N+1)=AB(x,y,N+1)Also, if the defocus amount D(x,y,N) of the N-th frame is less than orequal to the threshold value Dth, the following equation is used.G(x,y,N+1)=Max{AB(x,y,N+1),2×A(x,y,N+1)}The above processing is performed on all pixel coordinates regardingimage output in the (N+1)-th frame.

Also, until an instruction to end moving image shooting is given, thenumber of frames N is incremented in step S507, and the procedurereturns to step S504.

As described above, the loss of dynamic range that occurs whenoutputting an arithmetic average by referring to the defocus amount iscompensated for the G pixel, and the (A+B) image signal, which is theoriginal image signal, is used as is as image output for the R pixel andthe B pixel. Accordingly, image quality deterioration unique to thearithmetic average can be suppressed, while also stopping deteriorationin image quality at the requisite minimum.

Third Embodiment

Next, the third embodiment of the present invention will be described.In the third embodiment, instead of the operation performed in step S506of the first embodiment in which the final image signal is replaced witha doubled (a multiple of) A image signal, an operation in which thefinal image signal is replaced with the weighted average of the (A+B)image signal and the A image signal is performed, wherein the weightingis continuously changed between frames.

FIG. 8 is a table of conditions for calculating the final image signalP(x,y,N+1) in step S506 in the third embodiment. The “frame” columnshows the state of the defocus amount in each frame with symbols, andthe calculating formulas for the image signal P(x,y,N+1) for thecorresponding conditions are listed in the right field.

For example, in the case in which the condition of the third row is thatthe defocus amount in two consecutive frames from the (N−1)-th frame isDth or less, the value of P(x,y,N+1) is the larger out of AB(x,y,N+1)and {AB(x,y,N+1)+4×A(x,y,N+1)}/3. The latter value is the weightedaverage of the (A+B) image signal (x,y,N+1) and a doubled A image signalA(x,y,N+1), with a weighting of 1:2.

Accordingly, output of the (A+B) image signal AB(x,y,N+1), which is theoriginal image signal, is always prioritized in the case in which it isthe signal that is larger. However, if this image signal is not larger,the longer frames with the defocus amount less than or equal to Dthcontinue, i.e., frames in focus, the more the weighting is changed so asto gradually approach double the output of the A image signal.

In this way, by determining the final pixel signal using defocus amountsthat correspond to multiple frames, on top of effects similar to thosein the first embodiment, feelings of strangeness towards sudden colorchanges in frames that follow an in-focus frame can be suppressed.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments, and various variationsand modifications can be made within the scope of the gist of thepresent inventions. In the first to third embodiments described above,the A image signal has parallax, and has low sensitivity compared to the(A+B) image signal, and thus the configuration is such that the (A+B)image signal is replaced with the A image signal based on the defocusamount obtained from the image sensor. However, similar effects can beobtained even in a configuration in which the (A+B) image signal isreplaced with the A image signal based on the defocus amount obtainedfrom a phase difference sensor arranged in an imaging optical systemthat is different from the image sensor.

The scope of the following claims is to be accorded the broadestinterpretation so as to encompass all such modifications and equivalentstructures and functions.

This application claims the benefit of Japanese Patent Application No.2014-183496, filed on Sep. 9, 2014 which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An image capturing apparatus comprising: an imagesensor including a plurality of unit pixels each having a plurality ofphotoelectric conversion portions for one out of a plurality ofmicrolenses; a readout circuit that is capable of reading out pixelsignals by scanning the image sensor with a first scan method of addingand reading out signals from a portion of the plurality of photoelectricconversion portions by a predetermined number of unit pixels, and asecond scan method of adding and reading out signals from the pluralityof photoelectric conversion portions by the predetermined number of unitpixels; a control/operation circuit configured to perform the functionsof: a detection unit that obtains a defocus amount; and a controllerthat forms an image by determining, for each read out pixel signal, touse a pixel signal read out with the second scan method in a case inwhich the defocus amount is larger than a predetermined threshold value,or a larger signal out of the pixel signal read out with the second scanmethod and a signal obtained by using the pixel signal read out with thefirst scan method in a case in which the defocus amount is less than orequal to the predetermined threshold value.
 2. The image capturingapparatus according to claim 1, wherein in the case in which the defocusamount is less than or equal to the threshold value, the controllerdetermines to use a larger signal out of the pixel signal read out withthe second scan method and a signal obtained as a plural factor of thepixel signal read out with the first scan method.
 3. The image capturingapparatus according to claim 1, wherein the plurality of unit pixels arecovered by a primary color filter, and the controller, in a case of Rand B pixel signals, determines to use the pixel signal read out withthe second scan method regardless of the defocus amount, and in the caseof a G pixel signal, performs the determination based on the defocusamount.
 4. The image capturing apparatus according to claim 1, whereinin the case in which the defocus amount is less than or equal to thethreshold value, the controller determines to use a larger signal out ofthe pixel signal read out with the second scan method and a signal thatis a weighted average of the pixel signal read out with the first scanmethod and the pixel signal read out with the second scan method.
 5. Theimage capturing apparatus according to claim 4, wherein the controllerchanges weighting of the weighted average based on defocus amounts thatcorrespond to a plurality of frames, and increases a weight of the pixelsignal read out with the first scan method as long as the defocus amountfor each of the plurality of frames continues to be less than or equalto the threshold value.
 6. The image capturing apparatus according toclaim 1, wherein the detection unit calculates a defocus amount based onthe pixel signal read out with the first scan method and the pixelsignal read out with the second scan method.
 7. The image capturingapparatus according to claim 1, wherein the detection unit has aphotoelectric conversion portion that is different from the imagesensor, and obtains the defocus amount based on a signal obtained fromthe different photoelectric conversion portion.
 8. The image capturingapparatus according to claim 1, wherein the image capturing apparatuscan perform still image shooting and moving image shooting, and in themoving image shooting, the readout circuit performs scanning with thefirst scan method and the second scan method, and in the still imageshooting, performs scanning with a third scan method in which a signalis read out from a portion of the plurality of photoelectric conversionportions from each of the plurality of unit pixels, and performsscanning with a fourth scan method in which signals from the pluralityof photoelectric conversion portions are added and read out from each ofthe plurality of unit pixels.
 9. The image capturing apparatus accordingto claim 8, wherein, in the moving image shooting, the controllerperforms the determination based on the defocus amount obtained at atiming of one frame prior.
 10. A method of controlling an imagecapturing apparatus that has an image sensor including a plurality ofunit pixels each having a plurality of photoelectric conversion portionsfor one out of a plurality of microlenses, the method comprising:reading out pixel signals by scanning the image sensor with a first scanmethod of adding and reading out signals from a portion of the pluralityof photoelectric conversion portions by a predetermined number of unitpixels; reading out pixel signals by scanning the image sensor with asecond scan method of adding and reading out signals from the pluralityof photoelectric conversion portions by the predetermined number of unitpixels; obtaining a defocus amount; and determining, for each read outpixel signal, to use a pixel signal read out with the second scan methodin a case in which the defocus amount is larger than a predeterminedthreshold value, or a larger signal out of the pixel signal read outwith the second scan method and a signal obtained by using the pixelsignal read out with the first scan method in a case in which thedefocus amount is less than or equal to the predetermined thresholdvalue for forming an image.